﻿<%@ Control Language="C#" AutoEventWireup="true"
    Inherits="Controls_ContactControl" Codebehind="ContactControl.ascx.cs" %>
<style>
    .form_asterisk
    {
        color: Red;
    }
    .form_name
    {
        text-align: right;
        white-space: nowrap;
    }
    .form_text
    {
        font-size: 12px;
        text-align: left;
    }
    .form_text_note
    {
        color: #808080;
        font-size: 11px;
    }
    .contact_table td, .estimate_form_table td
    {
        padding: 3px 5px;
    }
    .imageCapcha
    {
        border: none;
        display: block;
        margin-top: 3px;
    }
</style>
<div id="contact">
    <table align="center" class="contact_table" cellpadding="0" cellspacing="0">
        <tr>
            <td class="form_name">
            </td>
            <td class="form_text">
                <asp:Literal ID="ltrContactMessage" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span class="form_asterisk">* </span><span lang="vi">
                    <asp:Literal ID="ltrHoTen" runat="server">Họ và tên</asp:Literal>
                </span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtFullName" Width="250" CssClass="form_control" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rvfFullName" ControlToValidate="txtFullName" runat="server"
                    ValidationGroup="ContactGroup" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span class="form_asterisk">* </span><span lang="vi">
                    <asp:Literal ID="ltrDiaChi" runat="server">Địa chỉ</asp:Literal></span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtAddress" Width="250" CssClass="form_control" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rvfAddress" ControlToValidate="txtAddress" runat="server"
                    ValidationGroup="ContactGroup" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span class="form_asterisk">* </span><span lang="vi">
                    <asp:Literal ID="ltrDienThoai" runat="server">>Điện thoại</asp:Literal></span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtPhone" Width="250" CssClass="form_control" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rvfPhone" ControlToValidate="txtPhone" runat="server"
                    ValidationGroup="ContactGroup" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span lang="vi">
                    <asp:Literal ID="ltrFax_Title" runat="server">Fax</asp:Literal></span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtFax" Width="250" CssClass="form_control" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span class="form_asterisk">* </span><span lang="vi">
                    <asp:Literal ID="ltrEmail_Title" runat="server">Email</asp:Literal></span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtEmail" Width="250" CssClass="form_control" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rvfEmail" ControlToValidate="txtEmail" runat="server"
                    ErrorMessage="*" ValidationGroup="ContactGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="refEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                    runat="server" ControlToValidate="txtEmail" ErrorMessage="Email không đúng" ValidationGroup="ContactGroup"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span lang="vi">
                    <asp:Literal ID="ltrNoiDung" runat="server">Nội dung liên hệ</asp:Literal></span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtConten" CssClass="form_control" TextMode="MultiLine" Height="150"
                    Width="300" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="form_name">
                <span class="form_asterisk">* </span><span lang="vi">
                    <asp:Literal ID="ltrMaSo" runat="server">Mã số an toàn</asp:Literal></span>:
            </td>
            <td class="form_text">
                <asp:TextBox ID="txtSecurityCode" CssClass="form_control" Width="100" runat="server"></asp:TextBox>
                <asp:Image ID="imgCapcha" runat="server" ImageUrl="~/CapCha.aspx" CssClass="imageCapcha" />
                <asp:RequiredFieldValidator ID="rvfSecurityCode" ControlToValidate="txtSecurityCode"
                    runat="server" ErrorMessage="*" ValidationGroup="ContactGroup"></asp:RequiredFieldValidator>
                <asp:CustomValidator ID="cvSecurityCode" ControlToValidate="txtSecurityCode" runat="server"
                    ErrorMessage="CustomValidator" OnServerValidate="cvSecurityCode_ServerValidate"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="form_name">
            </td>
            <td class="form_text">
                <asp:Button ID="btnSend" runat="server" Text="Gửi đi" CssClass="form_button" ValidationGroup="ContactGroup"
                    OnClick="btnSend_Click" />
                <asp:Button ID="btnReset" runat="server" Text="Làm lại" CssClass="form_button" OnClick="btnReset_Click" />
            </td>
        </tr>
        <tr>
            <td class="form_name" colspan="2">
                <span class="form_asterisk">
                    <asp:Label ID="lbMessage" runat="server" Text=""></asp:Label>
                </span>
        </tr>
    </table>
</div>
